﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;
using System.ComponentModel;
using System.Data.Objects;

namespace InWare.InNutri.Applications.Util
{
    public abstract class EntityViewModelBase<TEntity> : 
        ViewModelBase
        where TEntity : EntityObject
    {        
        #region Constructor
        public EntityViewModelBase(TEntity entity)
        {
            this.Entity = entity;
            this.Entity.PropertyChanged += new PropertyChangedEventHandler(Entity_PropertyChanged);
            
        } 
        #endregion

        #region Properties

        public TEntity Entity { get; private set; }
        

        #endregion

        #region Private methods

        private void Entity_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnPropertyChanged(e);
        } 

        #endregion

    }
}
